package com.zzj.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

/**
 * <p>
 * 聊天表
 * </p>
 *
 * @author zzj
 * @since 2023-05-13
 */
@TableName("picc_chat")
public class Chat implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 内容
     */
    private String content;

    /**
     * 发送用户名
     */
    private String fromUsername;

    private String fromAvatar;

    /**
     * 发送人姓名
     */
    private String fromName;

    /**
     * 接收用户名
     */
    private String toUsername;

    /**
     * 接收人姓名
     */
    private String toName;

    private String toAvatar;

    /**
     * 发送时间
     */
    @TableField(fill = FieldFill.INSERT)
    private String createTime;

    /**
     * 是否已读 0未读 1已读
     */
    private Integer isRead;

    /**
     * 消息类型 1普通文本 2图片 3语音
     */
    private Integer type;

    /**
     * 文本长度 语音时长 图片
     */
    private Integer size;

    /**
     * 0正常
     */
    private Integer status;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getFromUsername() {
        return fromUsername;
    }

    public void setFromUsername(String fromUsername) {
        this.fromUsername = fromUsername;
    }

    public String getFromAvatar() {
        return fromAvatar;
    }

    public void setFromAvatar(String fromAvatar) {
        this.fromAvatar = fromAvatar;
    }

    public String getFromName() {
        return fromName;
    }

    public void setFromName(String fromName) {
        this.fromName = fromName;
    }

    public String getToUsername() {
        return toUsername;
    }

    public void setToUsername(String toUsername) {
        this.toUsername = toUsername;
    }

    public String getToName() {
        return toName;
    }

    public void setToName(String toName) {
        this.toName = toName;
    }

    public String getToAvatar() {
        return toAvatar;
    }

    public void setToAvatar(String toAvatar) {
        this.toAvatar = toAvatar;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Integer getIsRead() {
        return isRead;
    }

    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Chat{" +
        "id = " + id +
        ", content = " + content +
        ", fromUsername = " + fromUsername +
        ", fromAvatar = " + fromAvatar +
        ", fromName = " + fromName +
        ", toUsername = " + toUsername +
        ", toName = " + toName +
        ", toAvatar = " + toAvatar +
        ", createTime = " + createTime +
        ", isRead = " + isRead +
        ", type = " + type +
        ", size = " + size +
        ", status = " + status +
        "}";
    }
}
